<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>呼叫云</title>
    <link rel="shortcut icon" href="../img/logox_circle.png">
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
	<script src="../js/jquery-1.11.0.min.js"></script> 
	<script src="../js/fenye.js"></script>
	<script src="../js/config.js"></script>
    <script src="../js/pintuer.js"></script>
	<script>
		$(function(){
			$("#showName").val("money1");
			var prompt = '${prompt}';
			if(prompt == 1){
				var url='${url}';
				location.href=serviceConfig.pay.getCustomerPayRecordList+url;
			}
	
			$("#payChannel").click(function(){
				$("#payChannelAlert").css("visibility","hidden");
			});
			$("#failReason").click(function(){
				$("#failReasonAlert").css("visibility","hidden");
				$("#fail").removeAttr("disabled");
			});
		});
		//支付成功
		function paySuccess(){
			$("#success").attr("disabled","disabled");
			var ok1=false;
			
			var payChannel = $("#payChannel").val();
			if(payChannel!=""){
				ok1 = true;
			}else{
				$("#payChannelAlert").css("visibility","");
			}
			
			if(ok1){
				var payRecordID = '${payRecordID}';
                location.href=serviceConfig.pay.payOperate+"?payRecordID="+payRecordID+"&payChannel="+payChannel;
            }
		}
		
		//支付失败
		function payFail(){
			$("#fail").attr("disabled","disabled");
			var ok1=false;
			
			var failReason = $("#failReason").val();
			if(failReason!=""){
				ok1 = true;
			}else{
				$("#failReasonAlert").css("visibility","");
			}
			
			if(ok1){
				var payRecordID = '${payRecordID}';
                location.href=serviceConfig.pay.payOperate+"?payRecordID="+payRecordID+"&failReason="+failReason;
            }
		}
		
		//返回
		function goback(){
			var url='${url}';
			location.href=serviceConfig.pay.getCustomerPayRecordList+url;
		}
	</script>
</head>

<body>
<div class="lefter">
    <div class="logo"><a href="#" target="_blank"><img style="width:100%;" src="../img/logo3.png" alt="呼叫云后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <div class="admin-navbar">
            <span class="float-right">
            	<span id="user_name"></span>
                <a class="button button-little bg-yellow" href="login">注销登录</a>
            </span>
            <#include "../common/head.ftl"> 
        </div>
        <div class="admin-bread">
            <ul class="bread">
                <li><a class="icon-money"> 支付管理</a></li>
                <li><a>客服提现</a></li>
				<li>运营支付</li>
            </ul>
        </div>
    </div>
</div>
<div class="admin">
	
	<div class="tab" style="width:90%;">
      <div class="tab-head">
        <ul class="tab-nav">
          <li class="active"><a href="#tab-success">支付成功</a></li>
          <li><a href="#tab-fail">支付失败</a></li>
        </ul>
      </div>
      <div class="tab-body">
        <br />
        <div class="tab-panel active" id="tab-success">
			<div style="width:8%;float:left;padding-top:30px;text-align:right;"><strong>支付渠道：</strong></div>
			<div style="width:18%;float:left;padding-top:25px;">
				<select class="input" style="width:90%;" id="payChannel" name="payChannel" disabled="disabled">
				<option value="">请选择支付渠道</option>
				<option value="1" selected>微信</option>
				<option value="2">支付宝</option>
				<option value="3">银行卡</option>
			</select>
			</div>
        	<div style="width:33%;float:left;padding-top:20px;">
				<div id="payChannelAlert" class="alert alert-yellow" style="width:50%;visibility:hidden;">支付渠道不能为空！</div>
			</div>
			<div style="width:80%;float:left;padding-top:40px;padding-left:8%;">
				<button class="button bg-main" style="width:80px;" id="success" onclick="paySuccess()">提交</button>
				<button class="button border-main" style="width:80px;margin-left:40px;" onclick="goback()">返回</button>
			</div>
        </div>
        <div class="tab-panel" id="tab-fail">
			<div style="width:10%;float:left;padding-top:30px;text-align:right;"><strong>支付失败原因：</strong></div>
			<div style="width:25%;float:left;padding-top:25px;">
				<textarea id="failReason" style="width:90%;" class="input" rows="5" cols="50" placeholder="请填写支付失败原因" ></textarea>
			</select>
			</div>
        	<div style="width:33%;float:left;padding-top:20px;">
				<div id="failReasonAlert" class="alert alert-yellow" style="width:50%;visibility:hidden;">失败原因不能为空！</div>
			</div>
			<div style="width:80%;float:left;padding-top:40px;padding-left:8%;">
				<button class="button bg-main" style="width:80px;" id="fail" onclick="payFail()">提交</button>
				<button class="button border-main" style="width:80px;margin-left:40px;" onclick="goback()">返回</button>
			</div>
		</div>
      </div>
    </div>
</div>
</body>
</html>